<!doctype html>
<html class="no-js" lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <title>createInitChallengeArgs</title>
<link href="../../../images/logo-icon.svg" rel="icon" type="image/svg"><script>var pathToRoot = "../../../";</script>
    <script>document.documentElement.classList.replace("no-js", "js");</script>
    <script>const storage = localStorage.getItem("dokka-dark-mode")
      if (storage == null) {
        const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
        if (osDarkSchemePreferred === true) {
          document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
      } else {
        const savedDarkMode = JSON.parse(storage)
        if (savedDarkMode === true) {
          document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
      }
    </script>
<script type="text/javascript" src="https://unpkg.com/kotlin-playground@1/dist/playground.min.js" async></script>
<script type="text/javascript" src="../../../scripts/sourceset_dependencies.js" async></script>
<link href="../../../styles/style.css" rel="Stylesheet">
<link href="../../../styles/main.css" rel="Stylesheet">
<link href="../../../styles/prism.css" rel="Stylesheet">
<link href="../../../styles/logo-styles.css" rel="Stylesheet">
<link href="../../../ui-kit/ui-kit.min.css" rel="Stylesheet">
<script type="text/javascript" src="../../../scripts/safe-local-storage_blocking.js"></script>
<script type="text/javascript" src="../../../scripts/navigation-loader.js" async></script>
<script type="text/javascript" src="../../../scripts/platform-content-handler.js" async></script>
<script type="text/javascript" src="../../../scripts/main.js" defer></script>
<script type="text/javascript" src="../../../scripts/prism.js" async></script>
<script type="text/javascript" src="../../../ui-kit/ui-kit.min.js" defer></script></head>
<body>
<div class="root">
    <header class="navigation theme-dark" id="navigation-wrapper" role="banner">
<a class="library-name--link" href="../../../index.html" tabindex="1">
                    stripe-android
            </a>        <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
        </button>
        <div class="navigation-controls--break ui-kit_mobile-only"></div>
        <div class="library-version" id="library-version">
        </div>
        <div class="navigation-controls">
        <ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
                <button class="platform-tag platform-selector jvm-like" data-active="" aria-pressed="true" data-filter=":3ds2sdk/main">androidJvm</button>
            <div class="dropdown filter-section--dropdown" data-role="dropdown" id="filter-section-dropdown">
                <button class="button button_dropdown filter-section--dropdown-toggle" role="combobox" data-role="dropdown-toggle" aria-controls="platform-tags-listbox" aria-haspopup="listbox" aria-expanded="false" aria-label="Toggle source sets"></button>
                <ul role="listbox" id="platform-tags-listbox" class="dropdown--list" data-role="dropdown-listbox" aria-label="Target filter">
                    <div class="dropdown--header"><span>Target filter</span>
                        <button class="button" data-role="dropdown-toggle" aria-label="Close target filter">
                            <i class="ui-kit-icon ui-kit-icon_cross"></i>
                        </button>
                    </div>
                        <li role="option" class="dropdown--option platform-selector-option jvm-like" tabindex="0">
                            <label class="checkbox">
                                <input type="checkbox" class="checkbox--input" id=":3ds2sdk/main" data-filter=":3ds2sdk/main">
                                <span class="checkbox--icon"></span>
                                androidJvm
                            </label>
                        </li>
                </ul>
                <div class="dropdown--overlay"></div>
            </div>
        </ul>
            <button class="navigation-controls--btn navigation-controls--btn_theme" id="theme-toggle-button" type="button">Switch theme
            </button>
            <div class="navigation-controls--btn navigation-controls--btn_search" id="searchBar" role="button">Search in
                API
            </div>
        </div>
    </header>
    <div id="container">
        <nav id="leftColumn" class="sidebar" data-item-type="SECTION" data-item-config="{&quot;defaultSize&quot;: 280, &quot;minSize&quot;: 200, &quot;maxSize&quot;: 400}">
            <a class="toc--skip-link" href="#main">Skip to content</a>
            <div class="dropdown theme-dark_mobile" data-role="dropdown" id="toc-dropdown">
                <ul role="listbox" id="toc-listbox" class="dropdown--list dropdown--list_toc-list" data-role="dropdown-listbox" aria-label="Table of contents">
                    <div class="dropdown--header">
                            <span>
                                    stripe-android
                            </span>
                        <button class="button" data-role="dropdown-toggle" aria-label="Close table of contents">
                            <i class="ui-kit-icon ui-kit-icon_cross"></i>
                        </button>
                    </div>
                    <div class="sidebar--inner" id="sideMenu"></div>
                </ul>
                <div class="dropdown--overlay"></div>
            </div>
        </nav>
        <div id="resizer" class="resizer" data-item-type="BAR"></div>
        <div id="main" data-item-type="SECTION" role="main">
<div class="main-content" data-page-type="member" id="content" pageids="3ds2sdk::com.stripe.android.stripe3ds2.transaction/Transaction/createInitChallengeArgs/#com.stripe.android.stripe3ds2.transaction.ChallengeParameters#kotlin.Int#com.stripe.android.stripe3ds2.transaction.IntentData/PointingToDeclaration//-374432591">
  <div class="breadcrumbs"><a href="../../index.html">3ds2sdk</a><span class="delimiter">/</span><a href="../index.html">com.stripe.android.stripe3ds2.transaction</a><span class="delimiter">/</span><a href="index.html">Transaction</a><span class="delimiter">/</span><span class="current">createInitChallengeArgs</span></div>
  <div class="cover ">
    <h1 class="cover"><span>create</span><wbr><span>Init</span><wbr><span>Challenge</span><wbr><span><span>Args</span></span></h1>
  </div>
  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":3ds2sdk/main"><div class="symbol monospace"><span class="token keyword">abstract </span><span class="token keyword">fun </span><a href="create-init-challenge-args.html"><span class="token function">createInitChallengeArgs</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">challengeParameters<span class="token operator">: </span><a href="../-challenge-parameters/index.html">ChallengeParameters</a><span class="token punctuation">, </span></span><span class="parameter ">timeoutMins<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html">Int</a><span class="token punctuation">, </span></span><span class="parameter ">intentData<span class="token operator">: </span><a href="../-intent-data/index.html">IntentData</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../-init-challenge-args/index.html">InitChallengeArgs</a></div><p class="paragraph">If the ARes that is returned indicates that the Challenge Flow must be applied, the 3DS Requestor App calls the <a href="create-init-challenge-args.html">createInitChallengeArgs</a> method with the required input parameters. The <a href="../-init-challenge-args/index.html">InitChallengeArgs</a> will be used to initiate the challenge process.</p><p class="paragraph">Note: The <a href="create-init-challenge-args.html">createInitChallengeArgs</a> method shall be called only when the Challenge Flow is to be applied.</p><p class="paragraph">When the <a href="create-init-challenge-args.html">createInitChallengeArgs</a> method is called and the Intent is started, control of the app is passed to the 3DS SDK. At this point:</p><ul><li><p class="paragraph">The 3DS SDK shall start a time counter to measure the overall time taken by the challenge process.</p></li><li><p class="paragraph">The 3DS SDK shall check if the CA public key (root) of the Directory Server CA (DS-CA) is present, based on the directoryServerID that was passed to the createTransaction method.</p></li><li><p class="paragraph">The 3DS SDK shall use the CA public key of the DS-CA to validate the ACS signed content JWS object. Based on the information included in the JWS object, the algorithm used to perform the validation can be PS256 or ES256.</p></li><li><p class="paragraph">The 3DS SDK shall complete the Diffie-Hellman key exchange process according to JWA (RFC</p></li></ul><ol><li><p class="paragraph">in Direct Key Agreement mode using curve P-256. The output of this process is a pair of CEKs.</p></li></ol><ul><li><p class="paragraph">The 3DS SDK shall use the CEKs to encrypt the CReq messages and decrypt the CRes messages.</p></li></ul><p class="paragraph">For more information about the algorithms used for validation, and the CEKs, refer to the "3DS SDK Secure Channel Set-Up" section in Section 6.2.3, "Function J: 3DS SDK—ACS Secure Channel Set-Up" in the EMV 3DS Protocol Specification. The 3DS SDK shall display the challenge to the Cardholder. The following steps shall take place during the challenge process:</p><ul><li><p class="paragraph">The 3DS Requestor App’s current screen shall be closed either before the challenge screen is launched or before the ChallengeStatusReceiver callback is invoked by the 3DS SDK. This is to prevent the Cardholder from revisiting the card details screen using the Back button during the challenge process. For more information about the user experience when the Cardholder taps the Back button, refer to Figure 4-1.</p></li><li><p class="paragraph">The 3DS SDK shall exchange two or more CReq and CRes messages with the ACS.</p></li><li><p class="paragraph">The 3DS SDK shall send the challenge status back to the 3DS Requestor App by using the ChallengeStatusReceiver callback functions.</p></li><li><p class="paragraph">The 3DS SDK shall clean up resources that are held by the Transaction object.</p></li></ul><p class="paragraph">At any point of time, if the time taken by the challenge process (as measured by the time counter) exceeds the timeout value passed by the 3DS Requestor App, then the 3DS SDK shall call the timedout method of the ChallengeStatusReceiver callback object and clean up resources that are held by the Transaction object.</p><h4 class="tableheader">Parameters</h4><div class="table"><div class="table-row table-row_content" data-filterable-current=":3ds2sdk/main" data-filterable-set=":3ds2sdk/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>challenge</span><wbr><span><span>Parameters</span></span></u></div></span></div><div><div class="title"><p class="paragraph">ACS details (contained in the ARes) required by the 3DS SDK to conduct the challenge process during the transaction. The following details are mandatory:</p><ul><li><p class="paragraph">3DS Server Transaction ID</p></li><li><p class="paragraph">ACS Transaction ID</p></li><li><p class="paragraph">ACS Reference Number</p></li><li><p class="paragraph">ACS Signed Content</p></li></ul></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":3ds2sdk/main" data-filterable-set=":3ds2sdk/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>timeout</span><wbr><span><span>Mins</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Timeout interval (in minutes) within which the challenge process must be completed. The minimum timeout interval shall be 5 minutes.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":3ds2sdk/main" data-filterable-set=":3ds2sdk/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>intent</span><wbr><span><span>Data</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Stripe Intent data that will be included in the Activity result</p></div></div></div></div></div></div></div>
</div>
    <div class="footer">
        <div class="footer--container">
            <a href="#content" id="go-to-top-link" class="footer--button footer--button_go-to-top"></a>
            <div class="footer--content">
                <div>
                    <span>Generated by </span>
                    <a class="footer--link footer--link_external" href="https://github.com/Kotlin/dokka">
                        Dokka
                    </a>
                    <div>© 2025 Copyright</div>
                </div>
            </div>
        </div>
    </div>
        </div>
    </div>
</div>
</body>
</html>